<template>
  <div>
    <!-- 今日榜单 -->
    <BillList title="今日榜单" type="2" size="6" />
    <!-- 新歌速递 -->
    <BillList title="新歌速递" type="1" size="3" />
    <!-- 轮播图 -->
    <Swiper :list="bannerList" />
    <!-- 音乐榜单 -->
    <TodayList />
    <!-- 热门歌单 -->
    <BillList title="热门歌单" type="24" size="6" />
  </div>
</template>

<script>
import BillList from "./components/BillList";
import TodayList from "./components/TodayList";
import Swiper from "@/components/Swiper";
// 导入图片资源
import bg1 from "../../assets/img/b1.jpg";
import bg2 from "../../assets/img/b2.jpg";
import bg3 from "../../assets/img/b3.jpg";

// import request from "../../utils/request.js";
// import { getBillList } from "../../api/baidu-music";

export default {
  components: {
    BillList,
    TodayList,
    Swiper,
  },
  data() {
    return {
      bannerList: [bg1, bg2, bg3],
    };
  },
  created() {
    // localhost:8080/api/v1/restserver/ting?method=baidu.ting.billboard.billList&type=1&size=1&offset=0
    // request
    //   .get(
    //     "/api/v1/restserver/ting?method=baidu.ting.billboard.billList&type=1&size=1&offset=0"
    //   ,{
    //     headers:{
    //       'custom':"11"
    //     }
    //   })
    //   .then((res) => {
    //     console.log(res);
    //   }).catch(err=>{
    //     console.log(err);
    //   })
    // getBillList(1).then(res=>{
    //   console.log(res);
    // })
  },
};
</script>

<style>
</style>